package com.luke.star.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Controller
public class TestController {
	
	@RequestMapping(value="/clickData",produces = "text/html;charset=UTF-8")
	@ResponseBody
	public String clickData(){
		log.info("开始测试数据请求");
		
		Map<String,Object> queryParam = new HashMap<>();
		queryParam.put("visits", "1,234");
		queryParam.put("unique_users", "2,345");
		queryParam.put("ip", "3,345");
		queryParam.put("click", "4,345");
		return JSON.toJSONString(queryParam);
	}

}
